﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="../themes/default/easyui.css" rel="stylesheet" />
    <link href="../themes/icon.css" rel="stylesheet" />
    <script src="../jquery-easyui-1.4.3/jquery.min.js"></script>
    <script src="../jquery-easyui-1.4.3/jquery.easyui.min.js"></script>
    <meta charset="utf-8" />
</head>
<body class="easyui-layout">
    <form id="ff">
        <div data-options="region:'north'" style="height:100px; background-color:cornflowerblue">
            <img src="logo(1).png" height="95" />
        </div>
        <div data-options="region:'south'" style="height:100px; background-color:cornflowerblue"></div>
        <div data-options="region:'west',title:'菜单导航',split:true" style="width:250px;">
            <div id="aa" class="easyui-accordion" style="width:243px;height:500px;">
                <div title="用户管理">
                    <ul class="menu" style="margin:0; padding:0; list-style:none">
                        <li><a id="a" url="https://www.baidu.com/">百度</a></li>
                        <li><a id="a" url="../01_Panel/01panel.html">01_Panel</a></li>
                        <li><a id="a" url="https://www.baidu.com/">百度</a></li>
                    </ul>
                </div>
                <div title="礼品管理">
                    content2
                </div>
                <div title="会员管理">
                    content3
                </div>
                <div title="会员消费">
                    content3
                </div>
                <div title="积分兑换">
                    content3
                </div>
                <div title="统计中心">
                    content3
                </div>
            </div>
        </div>
        <div id="tt" class="easyui-tabs" data-options="region:'center'">
        </div>
    </form>
</body>
</html>

<script>
    $(function () {
        $(".menu li a").click(function () {
            //获取url
            var src = $(this).attr("url");
            //获取a标签的文本，及页面的标题
            var titleShow = $(this).text();
            //编写一个iframe标签，
            var strHtml = '<iframe id="frmWorkArea" width="100%" height="99%" frameborder="0" scrolling="true" src="' + src + '"></iframe>';
            //判断tab标签中是否存在要打开的tab标签
            var isEsists = $("#tt").tabs('exists', titleShow);
            if (!isEsists) {
                $("#tt").tabs('add', {
                    title: titleShow,
                    content: strHtml,
                    iconCls: 'icon-ok',
                    closable: true
                });
            }
            else {
                $("#tt").tabs('select', titleShow);
            }
        })
    })
    
</script>
